//
//  MessageImageCollectionViewCell.swift
//  Pods
//
//  Created by eme on 2017/4/6.
//
//

import UIKit

class MessageImageCollectionViewCell: UICollectionViewCell {
    
    var customImageView: UIImageView!
    var deleteButton:UIButton!
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUpImageView()
        deleteBtn()
    }
    func setUpImageView(){
        customImageView = UIImageView()
        self.contentView.addSubview(customImageView)
        customImageView.snp.makeConstraints { (make) in
            make.top.left.right.bottom.equalTo(0)
        }
    }
    func deleteBtn(){
        deleteButton = UIButton(type:.custom)
        deleteButton.setImage(UIImage(named: "deleteIcon", in: SansaCore.bundle, compatibleWith: nil), for: .normal)
        self.contentView.addSubview(deleteButton)
        deleteButton.snp.makeConstraints { (make) in
            make.right.equalTo(0)
            make.top.equalTo(0)
            make.width.height.equalTo(20)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
